﻿namespace Douyu.SDK.Messages
{
    /// <summary>
    /// 客户端登录响应
    /// 格式:type@=loginres/userid@=0/roomgroup@=0/pg@=0/sessionid@=0/username@=/nickname@=/live_stat@=0/is_illegal@=0/ill_ct@=/ill_ts@=0/now@=0/ps@=0/es@=0/npv@=0/best_dlev@=0/cur_lev@=0/
    /// </summary>
    public class LoginResponse : BaseMessage
    {
        public LoginResponse() : base(MessageType.loginres, MsgType.ServerToClient)
        {
        }

        public LoginResponse(BaseMessage msg) : base(msg)
        {
        }

        /// <summary>
        /// 用户ID
        /// </summary>
        public int userid
        {
            get { return GetValue(nameof(userid), 0); }
            set { SetValue(nameof(userid), value); }
        }

        /// <summary>
        /// 分组号
        /// </summary>
        public int roomgroup
        {
            get { return GetValue(nameof(roomgroup), 1); }
            set { SetValue(nameof(roomgroup), value); }
        }

        /// <summary>
        /// 平台权限
        /// </summary>
        public int pg
        {
            get { return GetValue(nameof(pg), 1); }
            set { SetValue(nameof(pg), value); }
        }

        /// <summary>
        /// 会话ID
        /// </summary>
        public long sessionid
        {
            get { return GetValue(nameof(sessionid), 0); }
            set { SetValue(nameof(sessionid), value); }
        }

        /// <summary>
        /// 用户名
        /// </summary>
        public string username {
            get { return GetValue(nameof(username), ""); }
            set { SetValue(nameof(username), value); }
        }

        /// <summary>
        /// 用户昵称
        /// </summary>
        public string nickname
        {
            get { return GetValue(nameof(nickname), ""); }
            set { SetValue(nameof(nickname), value); }
        }

        /// <summary>
        /// 是否签到
        /// </summary>
        public int is_signed
        {
            get { return GetValue(nameof(is_signed), 0); }
            set { SetValue(nameof(is_signed), value); }
        }

        /// <summary>
        /// 是否签到
        /// </summary>
        public int signed_count
        {
            get { return GetValue(nameof(is_signed), 0); }
            set { SetValue(nameof(is_signed), value); }
        }

        /// <summary>
        /// 直播状态
        /// </summary>
        public int live_stat
        {
            get { return GetValue(nameof(live_stat), 0); }
            set { SetValue(nameof(live_stat), value); }
        }

        /// <summary>
        /// 是否需要手机验证
        /// </summary>
        public int npv
        {
            get { return GetValue(nameof(npv), 0); }
            set { SetValue(nameof(npv), value); }
        }

        /// <summary>
        /// 最高酬勤
        /// </summary>
        public int best_dlev
        {
            get { return GetValue(nameof(best_dlev), 0); }
            set { SetValue(nameof(best_dlev), value); }
        }

        /// <summary>
        /// 酬勤等级
        /// </summary>
        public int cur_lev
        {
            get { return GetValue(nameof(cur_lev), 0); }
            set { SetValue(nameof(cur_lev), value); }
        }

    }

}
